package org.docshare.zhuishu;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;

import com.alibaba.fastjson.JSON;
import com.loopj.android.http.AsyncHttpClient;
import com.loopj.android.http.AsyncHttpResponseHandler;
import com.loopj.android.http.RequestParams;

import java.io.UnsupportedEncodingException;


/**
 * Created by Administrator on 2016/5/14.
 */
public class JsonFragment extends Fragment implements RefleshListView.IReflashListener {
    RefleshListView list;

    private static final String TAG = "FavFragment";
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View v = inflater.inflate(R.layout.fragment_booklist,null,false);
        list = (RefleshListView) v.findViewById(R.id.booklist);

        list.setInterface(this);



        initList();

        return v;

    }
    private void initList(){
        Log.i(TAG, "initList: ");
        //设置主界面列表
        String[] sa = {"书架","发现新书","个人中心"};
        ArrayAdapter<String> aa = new ArrayAdapter<String>(this.getContext(),android.R.layout.simple_list_item_1,sa);
        list.setAdapter(aa);
    }

    @Override
    public void onReflash() {

    }
}
